home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-03-30 | 4.4 KB | 154 lines | [TEXT/PvRy] |
- // Persistence Of Vision raytracer version 2.0 sample file.
- // You will need the "Pov-Ray (68040)" version to run it.
-
- /*
- ! WARNING !
-
- This file has been disigned to be rendered with an unofficial
- version of Pov-Ray, which is not supported by the POV-Ray team.
- You can get this version by anonymous ftp at the following address
- sumex-aim.stanford.edu (36.44.0.6)
- and download the "POV-68040.hqx" package.
-
- This version supports trigonometric fuctions and loops in the scene description.
- You will need a 68040 tu run it, but you will be able to render scenes quicker
- than with the official version. The speed gain ranges from 3% to 42% (average 12%)
-
- */
-
- // Example using loops to describe a scene: Helicoidal wooden scale.
- // ©N.Guex, March 1994
-
- /*
- You can use, modify and include these columns freely in your scenes,
- BUT : WARNING !
- • If you decide to share or post a scene that need any of the new features
- • to be rendered, you MUST indicate clearly that this scene was designed
- • specifically for my version and that it will request it to be rendered.
- • Specify also where users can find my version, and the type of computer
- • needed (Macintosh with 68040).
- • This is only to insure that regular users will not be confused with some
- • scenes that they are unable to render.
- */
-
- #include "FOV.inc"
- #include "colors.inc"
- #include "textures.inc"
- #include "shapes.inc"
- #include "stones.inc"
-
-
- #declare posCamera = <0 ,30 ,-50 >
- #declare lookWhere = <0, -900, 3500>
-
- #declare XLight1 = -40
- #declare YLight1 = 37
- #declare ZLight1 = -40
-
- #declare XLight2 = 50
- #declare YLight2 = 60
- #declare ZLight2 = -15 // -10
-
-
- //••••••••••• Ligths & Camera •••••••••••
-
- camera {
- location posCamera
- direction <0 0 FoV_15>
- up <0 10 0>
- right <13.3 0 0>
- sky <0 10 0>
- look_at lookWhere
- rotate <0 0 0>
- }
-
- object {
- light_source { <XLight1, YLight1, ZLight1>
- color red 2 green 2 blue 2 }
- }
-
- object {
- light_source { <XLight2, YLight2, ZLight2>
- color red 1.1 green 1.1 blue 1.1 }
- }
-
- //••••••• O B J E C T S ••••••••
-
- //-------------------------------------------------
- // Declare an Helicoidal Scale
- //-------------------------------------------------
-
- #declare ScaleLength = 6
- #declare ScaleWidth = 3
- #declare ScaleHeight = 9
- #declare r1 = ScaleLength * 1.99999 // by decreasing this value, the "fences" are removed
- #declare floorLevel = 25
- #declare StepAngle= +atan(ScaleWidth/r1)
- #declare nbSteps = 38
-
- #declare OneScale =
- object {
- intersection {
- box { <0 , -(ScaleHeight+1), -ScaleLength> <ScaleWidth, 0, 0> }
- box { <0 , -100, -100> <100 , 0, 0> rotate < 0, 0, -atan(1/ScaleWidth) > }
- }
- bounded_by {
- object { box { <0 , -(ScaleHeight+1), -ScaleLength> <ScaleWidth, 0, 0> } }
- }
- translate < -(ScaleWidth/2), ScaleHeight+1, 0>
- }
-
- #declare Helicoidal_Scale =
- object {
- difference {
- object { Cylinder_Y
- texture { DMFDarkOak
- turbulence 0.1 rotate < 45 0 60 > scale <.3 .3 .3> }
- scale < r1 r1 r1 > }
- FOR i <0, StepAngle*nbSteps, StepAngle >
- object { OneScale
- translate < 0, (1/StepAngle)*i-10, -ScaleLength >
- rotate < 0, i, 0 >
- }
- ENDFOR
- object { OneScale translate < 0, -10, -ScaleLength*1.5 >} // remove 1st security bar
- object { OneScale translate < 0, -9 , -ScaleLength*1.5 > // remove 2nd security bar
- rotate < 0, StepAngle, 0 > }
- }
- texture { DMFLightOak turbulence 0.1 rotate < 20 30 15 > scale <.22 .22 .22> }
- bounded_by { object { Cylinder_Y scale < r1 r1 r1 >
- clipped_by { plane { <0, -1, 0 > (floorLevel+1) } }
- }
- }
- }
-
- //••••••••••• I M A G E ••••••••••••
-
- object { Helicoidal_Scale }
-
- //--------- SKY ---------
-
- object {
- plane { <0 1 0> 40 }
- texture {
- Bright_Blue_Sky
- turbulence 0.8
- scale <10 12 12 >
- translate < -3, 0, -10>
- finish {
- reflection 0
- ambient 0.45
- diffuse .0175
- }
- }
- no_shadow
- }
-
- //--------- GROUND ---------
-
- object {
- plane { <0, -1, 0> floorLevel }
- texture { Grnt10 }
- scale <.4 .4 .4>
- }
-